<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

<ui:define name="head">
    <script type="text/javascript">
        function doPopupWindow(obj) {
            var pkid = obj.parentNode.parentNode.childNodes[0].innerHTML;
            popupwindow = window.open("cbusPayoutQryDetl.xhtml?action=query&amp;pkid=" + pkid, "popupwindow", "height=600,width=800,left=200,top=100,toolbar=no,menubar=no,scrollbars=yes,location=no");
            popupwindow.focus;
        }
    </script>
    <style type="text/css">
        .input-col-m {
            width: 60px;
        }

        .input-col-l {
            width: 80px;
        }

        .input-col-xxl {
            width: 1%;
            text-align: right;
        }

        .col-80 {
        }

        .col-20 {
            width: 5%;
        }
    </style>

</ui:define>

<ui:define name="content">
<div style="margin:5px;">
<p:tabView style="font-weight:normal;font-style:normal" dynamic="true" cache="false">
<p:tab title="待复核记录清单">
    <div>
        <p:growl life="1000" id="msgs1" showDetail="false"/>
        <h:form id="form1">
            <p:menubar>
                <p:menuitem type="push" value="复核通过" icon="ui-icon ui-icon-document"
                            action="#{cbusPayoutAction.onCheck}" update="msgs1, pdt1, pdt2, pdt3" ajax="true"/>
                <p:menuitem type="push" value="退回" icon="ui-icon ui-icon-document"
                            action="#{cbusPayoutAction.onRefuse}" update="msgs1, pdt1,pdt2, pdt3" ajax="true"/>
            </p:menubar>
            <p:ajaxStatus style="height:18px;text-align:center">
                <f:facet name="start">
                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value=""/>
                </f:facet>
            </p:ajaxStatus>
            <p:dataTable id="pdt1" style="width:100%;"
                         dynamic="true" selection="#{cbusPayoutAction.selectedRecords}"
                         value="#{cbusPayoutAction.chkPayoutList}" var="record"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         paginator="true" rows="15" paginatorPosition="bottom"
                         rowsPerPageTemplate="100,50,30,15,5"
                         emptyMessage="数据记录为空...">
                <f:facet name="header">
                    实际用款待复核记录
                </f:facet>
                <p:column style="display:none;" headerText="pkid">
                    <h:outputText value="#{record.pkId}"/>
                </p:column>
                <p:column selectionMode="multiple"/>
                <p:column headerText="凭证号" style="text-align:center" filterBy="#{record.docNo}">
                    <h:outputText value="#{record.docNo}"/>
                </p:column>

                <p:column headerText="付款开发商" style="text-align:center" filterBy="#{record.payCompanyName}">
                    <h:outputText value="#{record.payCompanyName}"/>
                </p:column>

                <p:column headerText="付款监管账号" style="text-align:center" filterBy="#{record.payAccount}">
                    <h:outputText value="#{record.payAccount}"/>
                </p:column>

                <p:column headerText="收款方户名" style="text-align:left" filterBy="#{record.recCompanyName}">
                    <h:outputText value="#{record.recCompanyName}"/>
                </p:column>

                <p:column headerText="收款方账号" style="text-align:center" filterBy="#{record.recAccount}">
                    <h:outputText value="#{record.recAccount}"/>
                </p:column>

                <p:column headerText="申请金额" style="text-align:center">
                    <h:outputText value="#{record.plAmount}" style="float:right">
                        <f:convertNumber pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="记账日期" style="text-align:center">
                    <h:outputText value="#{record.createdDate}">
                        <f:convertDateTime pattern="yyyyMMdd HH:mm:ss" timeZone="GMT+08:00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="状态标志" style="text-align:left">
                    <h:outputText value="#{cbusPayoutAction.workResult.valueOfAlias(record.workResult).title}"/>
                </p:column>

                <p:column headerText="操作" style="text-align:center">
                    <p:commandLink value="详细" style="color:blue" update="popupwindow"
                                   onclick="doPopupWindow(this);"/>
                </p:column>

            </p:dataTable>
        </h:form>
    </div>
</p:tab>

<p:tab title="已通过记录清单">
    <div>
        <p:growl life="1000" id="msgs2" showDetail="false"/>
        <h:form id="form2">
            <p:menubar>
                <p:menuitem type="push" value="退回" icon="ui-icon ui-icon-document"
                            action="#{cbusPayoutAction.onRefuse}" update="msgs2, pdt1,pdt2, pdt3" ajax="true"/>
            </p:menubar>
            <p:ajaxStatus style="height:18px;text-align:center">
                <f:facet name="start">
                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value=""/>
                </f:facet>
            </p:ajaxStatus>
            <p:dataTable id="pdt2" style="width:100%;"
                         dynamic="true" selection="#{cbusPayoutAction.selectedRecords}"
                         value="#{cbusPayoutAction.passPayoutList}" var="record"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         paginator="true" rows="15" paginatorPosition="bottom"
                         rowsPerPageTemplate="100,50,30,15,5"
                         emptyMessage="数据记录为空...">
                <f:facet name="header">
                    实际用款通过记录
                </f:facet>
                <p:column style="display:none;" headerText="pkid">
                    <h:outputText value="#{record.pkId}"/>
                </p:column>
                <p:column selectionMode="multiple"/>
                <p:column headerText="凭证号" style="text-align:center" filterBy="#{record.docNo}">
                    <h:outputText value="#{record.docNo}"/>
                </p:column>

                <p:column headerText="付款开发商" style="text-align:center" filterBy="#{record.payCompanyName}">
                    <h:outputText value="#{record.payCompanyName}"/>
                </p:column>

                <p:column headerText="付款监管账号" style="text-align:center" filterBy="#{record.payAccount}">
                    <h:outputText value="#{record.payAccount}"/>
                </p:column>

                <p:column headerText="收款方户名" style="text-align:left" filterBy="#{record.recCompanyName}">
                    <h:outputText value="#{record.recCompanyName}"/>
                </p:column>

                <p:column headerText="收款方账号" style="text-align:center" filterBy="#{record.recAccount}">
                    <h:outputText value="#{record.recAccount}"/>
                </p:column>

                <p:column headerText="申请金额" style="text-align:center">
                    <h:outputText value="#{record.plAmount}" style="float:right">
                        <f:convertNumber pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="记账日期" style="text-align:center">
                    <h:outputText value="#{record.createdDate}">
                        <f:convertDateTime pattern="yyyyMMdd HH:mm:ss" timeZone="GMT+08:00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="状态标志" style="text-align:left">
                    <h:outputText value="#{cbusPayoutAction.workResult.valueOfAlias(record.workResult).title}"/>
                </p:column>

                <p:column headerText="操作" style="text-align:center">
                    <p:commandLink value="详细" style="color:blue" update="popupwindow"
                                   onclick="doPopupWindow(this);"/>
                </p:column>

            </p:dataTable>
        </h:form>
    </div>
</p:tab>

<p:tab title="退回记录清单">
    <div>
        <p:growl life="1000" id="msgs3" showDetail="false"/>
        <h:form id="form3">
            <p:menubar>
                <p:menuitem type="push" value="复核通过" icon="ui-icon ui-icon-document"
                            action="#{cbusPayoutAction.onCheck}" update="msgs3, pdt1, pdt2, pdt3" ajax="true"/>

            </p:menubar>
            <p:ajaxStatus style="height:18px;text-align:center">
                <f:facet name="start">
                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value=""/>
                </f:facet>
            </p:ajaxStatus>
            <p:dataTable id="pdt3" style="width:100%;"
                         dynamic="true" selection="#{cbusPayoutAction.selectedRecords}"
                         value="#{cbusPayoutAction.refusePayoutList}" var="record"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         paginator="true" rows="15" paginatorPosition="bottom"
                         rowsPerPageTemplate="100,50,30,15,5"
                         emptyMessage="数据记录为空...">
                <f:facet name="header">
                    实际用款退回记录
                </f:facet>
                <p:column style="display:none;" headerText="pkid">
                    <h:outputText value="#{record.pkId}"/>
                </p:column>
                <p:column selectionMode="multiple"/>
                <p:column headerText="凭证号" style="text-align:center" filterBy="#{record.docNo}">
                    <h:outputText value="#{record.docNo}"/>
                </p:column>

                <p:column headerText="付款开发商" style="text-align:center" filterBy="#{record.payCompanyName}">
                    <h:outputText value="#{record.payCompanyName}"/>
                </p:column>

                <p:column headerText="付款监管账号" style="text-align:center" filterBy="#{record.payAccount}">
                    <h:outputText value="#{record.payAccount}"/>
                </p:column>

                <p:column headerText="收款方户名" style="text-align:left" filterBy="#{record.recCompanyName}">
                    <h:outputText value="#{record.recCompanyName}"/>
                </p:column>

                <p:column headerText="收款方账号" style="text-align:center" filterBy="#{record.recAccount}">
                    <h:outputText value="#{record.recAccount}"/>
                </p:column>

                <p:column headerText="申请金额" style="text-align:center">
                    <h:outputText value="#{record.plAmount}" style="float:right">
                        <f:convertNumber pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="记账日期" style="text-align:center">
                    <h:outputText value="#{record.createdDate}">
                        <f:convertDateTime pattern="yyyyMMdd HH:mm:ss" timeZone="GMT+08:00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="状态标志" style="text-align:left">
                    <h:outputText value="#{cbusPayoutAction.workResult.valueOfAlias(record.workResult).title}"/>
                </p:column>

                <p:column headerText="操作" style="text-align:center">
                    <p:commandLink value="详细" style="color:blue" update="popupwindow"
                                   onclick="doPopupWindow(this);"/>
                </p:column>

            </p:dataTable>
        </h:form>
    </div>
</p:tab>
</p:tabView>

</div>

</ui:define>

</ui:composition>